package org.example.jcclubsubjectinfra.config;

import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 啊昌
 * @date 2025/4/13 15:03
 * MybatisConfiguration  添加自定义的 MybatisPlusAllSqlLog 拦截器
 */

@Configuration
public class MybatisConfiguration {

	@Bean
	public MybatisPlusInterceptor mybatisPlusInterceptor() {
		MybatisPlusInterceptor mybatisPlusInterceptor = new MybatisPlusInterceptor();
		mybatisPlusInterceptor.addInnerInterceptor(new MybatisPlusAllSqlLog());
		return mybatisPlusInterceptor;
	}
}
